mkdir /home/portainer
chmod 600 /home/portainer

docker service rm portainer-agent
docker service create --name portainer-agent -d --network=net \
--mode global \
--constraint node.platform.os==linux \
--mount type=bind,src=/var/run/docker.sock,dst=/var/run/docker.sock \
--mount type=bind,src=/var/lib/docker/volumes,dst=/var/lib/docker/volumes \
portainer/agent:latest


docker service rm portainer-ce
docker service create --name portainer-ce -d --network=net \
--constraint node.role==manager \
--mount type=bind,src=/var/run/docker.sock,dst=/var/run/docker.sock \
--mount type=bind,src=/home/portainer,dst=/data \
-l "traefik.http.routers.portainer-ce.rule=Host(\`portainer.fsgit.cc\`)" \
-l "traefik.http.routers.portainer-ce.entrypoints=websecure" \
-l "traefik.http.routers.portainer-ce.tls=true" \
-l "traefik.http.services.portainer-ce.loadbalancer.server.port=9000" \
portainer/portainer-ce:latest \
-H tcp://tasks.agent:9001 --tlsskipverify
docker service logs portainer-ce


